﻿@model ScrumPilot.Domain.Models.Main
@{
    ViewBag.Title = "ScrumPilot | Parameters";
    var items = new List<SelectListItem> {
        new SelectListItem {Selected = false, Text = "Scrum", Value = "0"},
        new SelectListItem {Selected = false, Text = "Kanban", Value = "1"}};
}
<div id="mainstdcontent">
    <h2>Parameters</h2>
    @using (Ajax.BeginForm(new AjaxOptions { OnBegin = "return startSave();", OnSuccess = "return endSave();" }))
    {
        @Html.ValidationSummary(true)
        <div class="span4">
            <h3>Config
            </h3>
            <div class="editor-label">
                @Html.LabelFor(model => model.TFSUrl)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.TFSUrl)
                @Html.ValidationMessageFor(model => model.TFSUrl)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.TFSSubDir)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.TFSSubDir)
                @Html.ValidationMessageFor(model => model.TFSSubDir)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.TFSPort)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.TFSPort)
                @Html.ValidationMessageFor(model => model.TFSPort)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.TFSID)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.TFSID)
                @Html.ValidationMessageFor(model => model.TFSID)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.TFSPWD)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.TFSPWD)
                @Html.ValidationMessageFor(model => model.TFSPWD)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.ScrumPilotWSAdress)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.ScrumPilotWSAdress)
                @Html.ValidationMessageFor(model => model.ScrumPilotWSAdress)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.DashBoardType)
            </div>
            <div class="editor-field">
                @Html.DropDownListFor(model => model.DashBoardType, new SelectList(items, "Value", "Text", Model.DashBoardType))
            </div>
        </div>
          
        <div class="span4">
            <h3>Levels</h3>
            <div class="editor-label">
                @Html.LabelFor(model => model.BugNormalLevel)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.BugNormalLevel)
                @Html.ValidationMessageFor(model => model.BugNormalLevel)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.BugOrangeLevel)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.BugOrangeLevel)
                @Html.ValidationMessageFor(model => model.BugOrangeLevel)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.BugRedLevel)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.BugRedLevel)
                @Html.ValidationMessageFor(model => model.BugRedLevel)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.TestToDoNormalLevel)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.TestToDoNormalLevel)
                @Html.ValidationMessageFor(model => model.TestToDoNormalLevel)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.TestToDoOrangeLevel)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.TestToDoOrangeLevel)
                @Html.ValidationMessageFor(model => model.TestToDoOrangeLevel)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.TestToDoRedLevel)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.TestToDoRedLevel)
                @Html.ValidationMessageFor(model => model.TestToDoRedLevel)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.KanbanMaxDoingLevel)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.KanbanMaxDoingLevel)
                @Html.ValidationMessageFor(model => model.KanbanMaxDoingLevel)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.KanbanMaxToTest)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.KanbanMaxToTest)
                @Html.ValidationMessageFor(model => model.KanbanMaxToTest)
            </div>
        </div>
     
        <div class="span4">
            <h3>Yammer</h3>
            <div class="editor-label">
                @Html.LabelFor(model => model.YammerConsumerKey)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.YammerConsumerKey)
                @Html.ValidationMessageFor(model => model.YammerConsumerKey)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.YammerConsumerSecret)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.YammerConsumerSecret)
                @Html.ValidationMessageFor(model => model.YammerConsumerSecret)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.YammerGroup)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.YammerGroup)
                @Html.ValidationMessageFor(model => model.YammerGroup)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => model.YammerTopic)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.YammerTopic)
                @Html.ValidationMessageFor(model => model.YammerTopic)
            </div>
            @if (!String.IsNullOrWhiteSpace(Model.YammerConsumerKey))
            {
                <div>
                </div>
           
                <div class="btn-group">
                    <a class="btn btn-primary" data-toggle="dropdown" href="#">Action
                <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="@Url.Action("YammerAuthorization", "Config")"><i class="icon-retweet"></i>Click here to authorize ScrumPilot to connect with your Yammer Account</a>

                        </li>
                        <li><a href="@Url.Action("YammerRenewToken", "Config")">Renew Yammer Autorization Token</a>
                        </li>
                    </ul>
                </div>
            }


        </div>
     
        <div class="row-fluid">
            <div class="span12 form-actions">
                <button type="submit" class="btn btn-primary btn-large">Save changes</button>
                <button type="button" class="btn">Cancel</button>
            </div>
        </div>
        
    }
</div>
